package com.ky.gp.app.service;

import com.ky.common.vo.R;
import com.ky.gp.app.config.OpenFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "gp-study-server",configuration = OpenFeignConfig.class)
public interface ReviewFeign {
    @RequestMapping(method = RequestMethod.POST, value = "/study/review/comment")
    public R comment(@RequestParam("articleId") Integer articleId, @RequestParam("content") String content);

        // 实现逻辑
    @RequestMapping("/study/review/findAll/{articleId}")
    Object findAll(@PathVariable("articleId") Integer articleId);

    @RequestMapping("/study/review/findProblem")
    R findProblem(@RequestParam("problemId") Integer problemId);


    @RequestMapping("/study/review/commentProblem")
    R commentProblem(@RequestParam("problemId") Integer problemId,@RequestParam("content") String comment);

    @RequestMapping("/study/review/findCircle")
    R findCircle(@RequestParam("circleArticleId") Integer circleArticleId);

    @RequestMapping("/study/review/commentCircle")
    R commentCircle(@RequestParam("circleArticleId") Integer circleArticleId,@RequestParam("content") String comment);
}
